package com.moleq.models;

import com.moleq.db.DatabaseSchema;

public class MixMatch_detail {
	
//	CREATE TABLE t_mix_match_setting
//	(ms_no integer NOT NULL,
//	ms_desc varchar(30) NULL,
//	F135 numeric(3,0) NULL,  --Sale Price Multiple 
//	F136 numeric(8,3) NULL,  --Sale Price 
//	F137 varchar(8) NULL,  --Sale Price Start Date 
//	F144 varchar(6) NULL,  --Sale Price Start Time 
//	F138 varchar(8) NULL,  --Sale Price End Date 
//	F145 varchar(6) NULL,  --Sale Price End Time 
//	F143 numeric(3,0) NULL,  --Sale Package Price Multiple 
//	F139 numeric(8,3) NULL,  --Sale Package Price 
//	F147 numeric(3,0) NULL,  --Limited Qty Amount 
//	F148 numeric(8,3) NULL,  --Limited Qty Price 
//	F111 numeric(8,3) NULL,  --Discount Amount 
//	F112 numeric(8,3) NULL,  --Discount Percent 
//	create_datetime varchar(14) NOT NULL,
//	update_datetime varchar(14) NOT NULL,
//	PRIMARY KEY (ms_no));
	
	private int ms_no;	
	private String ms_desc;	
	private String priceMultiple ;  //F135
	private String price ;  //F136
	private String startdate ;  //F137
	private String starttime ;  //F144
	private String enddate ;  //F138
	private String endtime ;  //F145
	private String packagepricemultiple ;  //F136
	private String packageprice ;  //F143
	private String limitedqtyamount ;  //F147
	private String limitedqtyprice  ;  //F148
	private String discountamount  ;  //F111
	private String discountpercent ;  //F112
	private String createTime;
	private String updateTime;
	private String discnt_link;
	private String price_lvl;

	public MixMatch_detail(){}
	
	public MixMatch_detail(int _ms_no,String _ms_desc,String _priceMultiple,String _price,String _startdate,String _starttime,String _enddate,
			String _endtime,String _packagepricemultiple,String _packageprice,String _limitedqtyamount,String _limitedqtyprice,
			String _discountamount,String _discountpercent,String _discnt_link,String _price_lvl){
		
		this.ms_no = _ms_no;
		this.ms_desc = _ms_desc;
		this.priceMultiple = _priceMultiple;
		this.price = _price;
		this.startdate = _startdate;
		this.starttime = _starttime;
		this.enddate = _enddate;
		this.endtime = _endtime;
		this.packagepricemultiple = _packagepricemultiple;
		this.packageprice = _packageprice;
		this.limitedqtyamount = _limitedqtyamount;
		this.limitedqtyprice = _limitedqtyprice;
		this.discountamount = _discountamount;
		this.discountpercent = _discountpercent;
		this.discnt_link = _discnt_link;
		this.price_lvl = _price_lvl;
	}
	
	public MixMatch_detail(int _ms_no,String _ms_desc,String _priceMultiple,String _price,String _startdate,String _starttime,String _enddate,
			String _endtime,String _packagepricemultiple,String _packageprice,String _limitedqtyamount,String _limitedqtyprice,
			String _discountamount,String _discountpercent,String createTime,String updateTime,String _discnt_link,String _price_lvl){
		
		this.ms_no = _ms_no;
		this.ms_desc = _ms_desc;
		this.priceMultiple = _priceMultiple;
		this.price = _price;
		this.startdate = _startdate;
		this.starttime = _starttime;
		this.enddate = _enddate;
		this.endtime = _endtime;
		this.packagepricemultiple = _packagepricemultiple;
		this.packageprice = _packageprice;
		this.limitedqtyamount = _limitedqtyamount;
		this.limitedqtyprice = _limitedqtyprice;
		this.discountamount = _discountamount;
		this.discountpercent = _discountpercent;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.discnt_link = _discnt_link;
		this.price_lvl = _price_lvl;
	}
	
	public String getDiscnt_link() {
		return discnt_link;
	}

	public void setDiscnt_link(String discnt_link) {
		this.discnt_link = discnt_link;
	}
	
	public String getPrice_lvl() {
		return price_lvl;
	}

	public void setPrice_lvl(String price_lvl) {
		this.price_lvl = price_lvl;
	}

	public int getMs_no() {
		return ms_no;
	}


	public void setMs_no(int ms_no) {
		this.ms_no = ms_no;
	}


	public String getMs_desc() {
		return ms_desc;
	}


	public void setMs_desc(String ms_desc) {
		this.ms_desc = ms_desc;
	}


	public String getPriceMultiple() {
		return priceMultiple;
	}


	public void setPriceMultiple(String priceMultiple) {
		this.priceMultiple = priceMultiple;
	}


	public String getPrice() {
		return price;
	}


	public void setPrice(String price) {
		this.price = price;
	}


	public String getStartdate() {
		return startdate;
	}


	public void setStartdate(String startdate) {
		this.startdate = startdate;
	}


	public String getStarttime() {
		return starttime;
	}


	public void setStarttime(String starttime) {
		this.starttime = starttime;
	}


	public String getEnddate() {
		return enddate;
	}


	public void setEnddate(String enddate) {
		this.enddate = enddate;
	}


	public String getEndtime() {
		return endtime;
	}


	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}


	public String getPackagepricemultiple() {
		return packagepricemultiple;
	}


	public void setPackagepricemultiple(String packagepricemultiple) {
		this.packagepricemultiple = packagepricemultiple;
	}


	public String getPackageprice() {
		return packageprice;
	}


	public void setPackageprice(String packageprice) {
		this.packageprice = packageprice;
	}


	public String getLimitedqtyamount() {
		return limitedqtyamount;
	}


	public void setLimitedqtyamount(String limitedqtyamount) {
		this.limitedqtyamount = limitedqtyamount;
	}


	public String getLimitedqtyprice() {
		return limitedqtyprice;
	}


	public void setLimitedqtyprice(String limitedqtyprice) {
		this.limitedqtyprice = limitedqtyprice;
	}


	public String getDiscountamount() {
		return discountamount;
	}


	public void setDiscountamount(String discountamount) {
		this.discountamount = discountamount;
	}


	public String getDiscountpercent() {
		return discountpercent;
	}


	public void setDiscountpercent(String discountpercent) {
		this.discountpercent = discountpercent;
	}


	public String getCreateTime() {
		return createTime;
	}


	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}


	public String getUpdateTime() {
		return updateTime;
	}


	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	
	public String toMGData(String Action) {
		String Result = Action + "|" + DatabaseSchema.MixMatchSetting.SCHEMA_NAME
				+ "|(" +getMs_no() + ","+ CheckNull(getMs_desc()) + "," + getPriceMultiple() + ","
				+ getPrice() + "," + CheckNull(getStartdate()) + "," + CheckNull(getStarttime())
				+ "," + CheckNull(getEnddate()) + "," + CheckNull(getEndtime()) + ","
				+ getPackagepricemultiple() + "," + getPackageprice() + ","
				+ getLimitedqtyamount() + "," + getLimitedqtyprice() + ","
				+ getDiscountamount() + "," + getDiscountpercent() + ","
				+ CheckNull(getCreateTime()) + "," + CheckNull(getUpdateTime()) + "," 
				+ getDiscnt_link() + "," + getPrice_lvl() + ")";
		return Result;
	}
	
	public String CheckNull(String value) {
		if (value == null) {
			return null;
		} else {
			return "'" + value + "'";
		}
	}

}
